import ajax from '@/api/apiConfig.js'

/* 获取维保任务列表 */
export const getMaintenceList = (data) => {
  return ajax.get('maintain/getMaintainTask', data)
}

/* 获取维保任务状态统计 */
export const statMaintainTask = (data) => {
  return ajax.get('maintain/statMaintainTask', data)
}

/* 指派维保任务执行人员 */
export const updateMaitainAccount = (data) => {
  return ajax.get('maintain/updateMaitainAccount', data)
}

/* 获取所有维保标准 */
export const getAllMaintainStandard = (data) => {
  return ajax.get('maintain/getAllMaintainStandard', data)
}

/* 获取维保标准详情列表 */
export const getMaintainStandardDetailList = (data) => {
  return ajax.get('maintain/getMaintainStandardDetailList', data)
}

/* 新增/编辑更新维保标准详情 */
export const updateMaintainStandardDetail = (data) => {
  return ajax.post('maintain/updateMaintainStandardDetail', data)
}

/* 删除维保标准详情 */
export const delMaintainStandardDetail = (data) => {
  return ajax.get('maintain/delMaintainStandardDetail', data)
}

/* 新增/编辑更新维保标准 */
export const updateMaintainStandard = (data) => {
  return ajax.post('maintain/updateMaintainStandard', data)
}

/* 删除整套维保标准 */
export const delMaintainStandard = (data) => {
  return ajax.post('maintain/delMaintainStandard', data)
}

/* 获取维保任务详情 */
export const getMaintainTaskDetailByTaskId = (data) => {
  return ajax.get('maintain/getMaintainTaskDetailByTaskId', data)
}

/* 获取维保任务详情 */
export const getHaveOrgUserList = (data) => {
  return ajax.get('user/getHaveOrgUserList', data)
}

/* 维保分析-时间维度 */
export const getMaintainAnalysisByTime = (data) => {
  return ajax.get('maintain/getMaintainAnalysisByTime', data)
}

/* 获取维保计划列表 */
export const getPlanList = (data) => {
  return ajax.get('maintain/getPlanList', data)
}

/* 改变计划状态 */
export const changePlanStatus = (data) => {
  return ajax.post('maintain/changePlanStatus', data)
}

/* 删除计划 */
export const delPlan = (data) => {
  return ajax.post('maintain/delPlan', data)
}
